home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / pqmenu.zip / PQMENU.DOC < prev    next >
Text File  |  1992-02-22  |  5KB  |  106 lines

  1. This menu is freeware and I claim responsibility for nothing.
  2. So much for the legal stuff.
  3.  
  4. If your serious about programing in basic do your self a favor and get
  5. Pro Bas. There are over 900 routines in version 5.0
  6. I bought it about a year ago and it's fantastic. The last time I checked
  7. 5.0 was about $180 if your interested the number is 1-800-447-9120 
  8.  
  9. If you don't own Pro Bas from Tera Tek, formerly Hammerly software
  10. stop reading and go on to your next project.
  11. There are some Pro Bas clones on BBS's this menu may or may not work
  12. with them. It never hurts to try.
  13.  
  14. If you do own Pro Bas There is nothing more to say on the subject, just
  15. read on.
  16.  
  17.    This menu is part of a larger program that i'm working on.
  18. I have included the source code but I warn you that I don't like to document.
  19. So explanations are brief and hapazard.
  20.  
  21.    PQMENU is designed to work like the Quick Basic menu.
  22. You can use as many main menu items as will fit on the menu bar.
  23. You have full controll of the placemnt of those items.
  24. Up to 22 secondary menu items can be placed under each main menu item.
  25. All items support a highlighted Hot Key, color of your choice.
  26. Pull down menu windows have true shadows.
  27. All secondary menu items can be active or inactive as you choose.
  28. Full mouse support.
  29.  
  30. You must use the include file PQMENU.BI as this contains the TYPE
  31. declarations used by PQMENU.
  32. The calling syntax is
  33.  
  34. CALL MENU(PullDown(), MenuColor, frame, framecolor, textcolor, HotKeyColor, BarColor, Inactive, choice$, click%)
  35.  
  36. The Syntax is long, I would have put all the colors in a typed array but after
  37. it was done I didn't feel like putting the effort into it. Maybe latter
  38. if enough people want it.
  39. -----------------------------------------------------------------------------
  40. PullDown():  'Can be any name you choose'
  41.     This is an array of Type ( MenuItems )
  42. Dimention it to the number of main menu items on the menu bar.
  43.    There are 4 parts to this array
  44.      
  45.    PullDown().titles    The name of a single main menu element
  46.    PullDown().items     all Secondary menu items seperated by a "/"
  47.    PullDown().HotKey    holds position to highlight, Hot Key letter,
  48.                         Weather or not item is active.
  49.                         Seperate each set by a "/"
  50.    PullDown().Position  The position of the main menu item
  51.  
  52.                            Example
  53.  
  54.   REDIM PullDown(4) AS MenuItems                 : 4 menu items           
  55.   PullDown(1).titles = "FILE"                    : File menu
  56.   PullDown(1).items = "OPEN/SAVE/MERGE/CREATE"   :items in then file menu
  57.   PullDown(1).HotKey = "1F/2P1/1S1/1M1/1C0"   
  58.                         1F  :1 highlight the first letter of (FILE)
  59.                             :F is the Hot Key for (FILE)
  60.                         2P1 :2 highlight the second letter in (OPEN)
  61.                             :P is the hot key for (OPEN)
  62.                             :1 indicates that this item is active
  63.                                A "0" indicates that an item is inactive
  64.                          etc....
  65.  
  66.  
  67.   If you noticed that there are only two paremeters for the
  68. first item, it's because main menu items can not be inactive so the
  69. last paremeter is not needed.
  70.  
  71.   PullDown(1).position = 4       : Print (FILE) starting at column 4
  72.   ------------------------------------------------------------------------
  73.  
  74.  
  75.   MenuColor         Color of the menu
  76.   frame = 1         type of frame for pull down menu / same as windowmanager
  77.   framecolor = 4    color of the frame
  78.   TEXTCOLOR = 0     color of menu text
  79.   HotKeyColor = 15  color of the Hot Key
  80.   BarColor = 4      Color of the slide bar
  81.   Inactive = 8      color for inactive items
  82.   choice$           upon return holds the the choice picked in the menu
  83.   click             if click = 0 then the main menu will be shown but
  84.                     not active
  85.                     after calling GetKey4 pass the value returned alt or lft
  86.                     to click and call the menu this will activate it.
  87.                        
  88.                         NOTE ( lft ) is ( click )in the demo
  89.  
  90.  
  91.  One final note, I used the variable mouse with MMCHECK and it's a shared
  92.  variable so if you want to use something else you will have to change the
  93.  source code.
  94.  Be sure to include the line        CALL MMCHECK(mouse)    in the
  95.  beginning of your program
  96.  
  97. I have added a special command GetKey4(mouse,asccode,scancode,lft,rgt,alt)
  98.   use this in place of  GETKEY
  99.   GETKEY does not chkeck for the ALT key press
  100.   GetKey4 will check for and allow you to activate the menu by pressing
  101.   the ALT key like in Quick Basic
  102.  
  103.  
  104.  
  105.  
  106.